package com.lanou.utp.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * @author MaQingYun
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Clazz implements Serializable {

    public interface addClazz {  };

    private Long id; /* 班级id */

    @NotNull(message = "专业id 不能为空",groups = {addClazz.class})
    private Long majorId; /* 专业id */

    @NotBlank(message = "班级名称不能为空",groups = {addClazz.class})
    private String name; /* 班级名称 */

    @NotBlank(message = "年级不能为空",groups = {addClazz.class})
    private String grade; /* 年  级 */

    @NotNull(message = "专业id 不能为空",groups = {addClazz.class})
    private Long leaderId; /* 班级负责人id */

    private Long monitorId; /* 班长id */

    private String monitorName;

//    private College college;
    private Major major;
    private String collegeName;
    private String majorName;
    private Long collegeId;
    private Integer count;/* 班级人数 */
    private Long parentId;
    private String parentNode;
    private String leaderName;

    private final Integer level = 3;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;/*创建时间*/

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;/*更新时间*/

    private Integer status;/*状态*/

}
